
<script lang="ts" setup>
import { ref, watch } from 'vue';


const totalCount = ref(10)
const msg = ref('hello')
watch([totalCount,msg],(newValue,oldValue)=>{
  console.log('totalCount',totalCount.value)
  console.log(newValue,oldValue);
})


</script>

<template>
<button @click="totalCount++">点击</button>
<button @click="msg+='吴彦祖'">hello</button>
</template>

<style scoped></style>